<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * Description: 产品详情
 *
 * @author      Eden
 * @datetime    2016/12/18 16:22
 * @copyright   Beijing CmsTop Technology Co.,Ltd.
 */

class Goods extends WAP_Controller
{

    /**
     * 初始化
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 详情
     */
    public function detail()
    {
        $goodsId = $this->input->get('goodsId');
        if (empty($goodsId)) {
            show_404();
            exit;
        }

        $this->load->model('wap/goods/Detail_Model', 'goods');
        $res = $this->goods->run($goodsId);

        if (empty($res)) {
            show_404();
            exit;
        }

        $this->load->view('wap/goods/detail.html', array(
            'detail' => $res
        ));
    }
}
